//json 字符串
let s = '[10,20,30]'
console.log(s)
let o = '{"id":10,"name":"李四","isstu":true,"score":[90,80,60]}'
console.log(o, typeof (o))

//json 对象
let id = 55
let name = '李强'

let obj = {id, name}
console.log(obj, typeof (obj))

let stu = {id: 66, name: '张三丰', age: 18, addr: '郑州'}
console.log(stu, typeof (stu))

//json 对象转 字符串
let s1 = JSON.stringify(stu)
console.log(s1, typeof (s1))

//json 字符串 对象
let s2 = '{"id":66,"name":"张三丰","age":18,"addr":"郑州"}'
let s3 = JSON.parse(s2)
console.log(s3)
console.log(s3.id) //66
console.log(s3.name) //张三丰
console.log(s3['addr']) //郑州
console.log(typeof (s3)) //object